| 1 |
function videoPlacements(pId_container,$n){ |
| 2 |
|
| 3 |
var cont_width=$n('#'+pId_container).width(); |
| 4 |
|
| 5 |
|
| 6 |
if(cont_width>=100 && cont_width<=365){ |
| 7 |
|
| 8 |
$n('#'+pId_container+' > .box_parent').css( "width", "100%" ); |
| 9 |
$n('#'+pId_container+' .box_grid').css( "width", "100%" ); |
| 10 |
$n('#'+pId_container+' .box_grid').css( "padding-bottom", "76%" ); |
| 11 |
|
| 12 |
} |
| 13 |
else if(cont_width>=366 && cont_width<=500){ |
| 14 |
|
| 15 |
|
| 16 |
$n('#'+pId_container+' > .box_parent').css( "width", "80%" ); |
| 17 |
$n('#'+pId_container+' > .box_parent').css( "margin", "0 auto" ); |
| 18 |
$n('#'+pId_container+' .box_grid').css( "width", "100%" ); |
| 19 |
$n('#'+pId_container+' .box_grid').css( "padding-bottom", "76%" ); |
| 20 |
|
| 21 |
} |
| 22 |
else if(cont_width>=500 && cont_width<=700){ |
| 23 |
|
| 24 |
$n('#'+pId_container+' > .box_parent').css( "width", "100%" ); |
| 25 |
$n('#'+pId_container+' .box_grid').css( "width", "50%" ); |
| 26 |
$n('#'+pId_container+' .box_grid').css( "padding-bottom", "38%" ); |
| 27 |
|
| 28 |
} |
| 29 |
else if(cont_width>=700 && cont_width<=1000){ |
| 30 |
|
| 31 |
$n('#'+pId_container+' > .box_parent').css( "width", "100%" ); |
| 32 |
$n('#'+pId_container+' .box_grid').css( "width", "33.3%" ); |
| 33 |
$n('#'+pId_container+' .box_grid').css( "padding-bottom", "25.3%" ); |
| 34 |
|
| 35 |
} |
| 36 |
else if(cont_width>=1000 && cont_width<=1200){ |
| 37 |
|
| 38 |
$n('#'+pId_container+' > .box_parent').css( "width", "100%" ); |
| 39 |
$n('#'+pId_container+' .box_grid').css( "width", "25%" ); |
| 40 |
$n('#'+pId_container+' .box_grid').css( "padding-bottom", "19%" ); |
| 41 |
|
| 42 |
} |
| 43 |
else if(cont_width>=1200 && cont_width<=1500){ |
| 44 |
|
| 45 |
$n('#'+pId_container+' > .box_parent').css( "width", "100%" ); |
| 46 |
$n('#'+pId_container+' .box_grid').css( "width", "25%" ); |
| 47 |
$n('#'+pId_container+' .box_grid').css( "padding-bottom", "19%" ); |
| 48 |
|
| 49 |
} |
| 50 |
else if(cont_width>=1500 ){ |
| 51 |
|
| 52 |
$n('#'+pId_container+' > .box_parent').css( "width", "100%" ); |
| 53 |
$n('#'+pId_container+' > .box_parent').css( "max-width", "1500px" ); |
| 54 |
$n('#'+pId_container+' > .box_parent').css( "margin", "0 auto" ); |
| 55 |
$n('#'+pId_container+' .box_grid').css( "width", "22%" ); |
| 56 |
$n('#'+pId_container+' .box_grid').css( "padding-bottom", "17%" ); |
| 57 |
|
| 58 |
} |
| 59 |
|
| 60 |
|
| 61 |
} |
| 62 |
|