/**
* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
*
*
* @param f onMouseOver function || An object with configuration options
* @param g onMouseOut function || Nothing (use configuration options object)
* @author Brian Cherne
/*
* DC Mega Menu - jQuery mega menu
* Copyright (c) 2011 Design Chemical
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
(function($){
//define the defaults for the plugin and how to call it
$.fn.dcMegaMenu = function(options){
//set default options
var defaults = {
classParent: 'dc-mega',
classContainer: 'sub-container',
classSubParent: 'mega-hdr',
classSubLink: 'mega-hdr',
classWidget: 'dc-extra',
rowItems: 3,
speed: 'fast',
effect: 'fade',
event: 'hover',
fullWidth: false,
onLoad : function(){},
beforeOpen : function(){},
beforeClose: function(){}
};
//call in the default otions
var options = $.extend(defaults, options);
var $dcMegaMenuObj = this;
//act upon the element that is passed into the design
return $dcMegaMenuObj.each(function(options){
var clSubParent = defaults.classSubParent;
var clSubLink = defaults.classSubLink;
var clParent = defaults.classParent;
var clContainer = defaults.classContainer;
var clWidget = defaults.classWidget;
megaSetup();
function megaOver(){
var subNav = $('.sub',this);
$(this).addClass('mega-hover');
if(defaults.effect == 'fade'){
$(subNav).fadeIn(defaults.speed);
}
if(defaults.effect == 'slide'){
$(subNav).show(defaults.speed);
}
// beforeOpen callback;
defaults.beforeOpen.call(this);
}
function megaAction(obj){
var subNav = $('.sub',obj);
$(obj).addClass('mega-hover');
if(defaults.effect == 'fade'){
$(subNav).fadeIn(defaults.speed);
}
if(defaults.effect == 'slide'){
$(subNav).show(defaults.speed);
}
// beforeOpen callback;
defaults.beforeOpen.call(this);
}
function megaOut(){
var subNav = $('.sub',this);
$(this).removeClass('mega-hover');
$(subNav).hide();
// beforeClose callback;
defaults.beforeClose.call(this);
}
function megaActionClose(obj){
var subNav = $('.sub',obj);
$(obj).removeClass('mega-hover');
$(subNav).hide();
// beforeClose callback;
defaults.beforeClose.call(this);
}
function megaReset(){
$('li',$dcMegaMenuObj).removeClass('mega-hover');
$('.sub',$dcMegaMenuObj).hide();
}
function megaSetup(){
$arrow = '';
var clParentLi = clParent+'-li';
var menuWidth = $dcMegaMenuObj.outerWidth();
$('> li',$dcMegaMenuObj).each(function(){
//Set Width of sub
var $mainSub = $('> ul',this);
var $primaryLink = $('> a',this);
if($mainSub.length){
$primaryLink.addClass(clParent).append($arrow);
$mainSub.addClass('sub').wrap('
var _titleSllipsis=null;
var _loadFbSDk=null;
jQuery(document).ready(function(){
//--Menu
jQuery('#mega-menu-1').dcMegaMenu({
speed: 'fast',
effect: 'slide'
});
//Thanh cuộn top phim tuần+tháng
jQuery(function(){
jQuery('#list-top-movie-week, #list-top-film-week').slimScroll({
height: '477px',
railVisible: true,
alwaysVisible: true
});
});
// Cuộn qua lại các box phim mới của từng mục
jQuery('.last-film-box').each(function(){
var currentId=jQuery(this).attr('id');
var categoryId=jQuery(this).attr('data-categoryid');
if(typeof currentId=='string' && typeof categoryId=='string')
{
jQuery('#'+currentId).carouFredSel({
auto: false,
prev: '#prev'+categoryId,
next: '#next'+categoryId
});
}
});
//--Cuộn lại top phim mới ở home
jQuery('#movie-carousel-top').carouFredSel({
auto: false,
prev: '#prevTop',
next: '#nextTop',
});
//--Tab phim mới cập nhật
jQuery("#tabs-movie").tabs();
//hiện ... ở tên phim
_titleSllipsis=function(){
//--Nếu trình duyệt đời mới hỗ trợ HTML5 và CSS3 thì khỏi
if(typeof window.localStorage!='undefined')
return true;
jQuery(".movie-title-1, .movie-title-2, .news-title-1 a, .name-en a").ellipsis();
}
jQuery(window).load(function(){
setTimeout("_titleSllipsis()",1000);
});
//Facebook SDK
jQuery('body').append('
/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Version: 1.1.0
*
*/
(function(f){jQuery.fn.extend({slimScroll:function(l){var a=f.extend({width:"auto",height:"250px",size:"7px",color:"#555",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:0.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200},l);this.each(function(){function r(d){if(n){d=d||window.event;var c=0;d.wheelDelta&&(c=-d.wheelDelta/
120);d.detail&&(c=d.detail/3);f(d.target||d.srcTarget).closest("."+a.wrapperClass).is(b.parent())&&g(c,!0);d.preventDefault&&!p&&d.preventDefault();p||(d.returnValue=!1)}}function g(d,f,h){var e=d,g=b.outerHeight()-c.outerHeight();f&&(e=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),e=Math.min(Math.max(e,0),g),e=0=b.outerHeight()?p=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&h.stop(!0,!0).fadeIn("fast"))}function m(){a.alwaysVisible||(w=setTimeout(function(){if((!a.disableFadeOut||!n)&&!u&&!v)c.fadeOut("slow"),h.fadeOut("slow")},1E3))}var n,u,v,w,y,q,j,x,B=30,p=!1,b=f(this);if(b.parent().hasClass(a.wrapperClass)){var k=b.scrollTop(),c=b.parent().find("."+a.barClass),h=b.parent().find("."+a.railClass);t();if(f.isPlainObject(l)){if("scrollTo"in l)k=
parseInt(a.scrollTo);else if("scrollBy"in l)k+=parseInt(a.scrollBy);else if("destroy"in l){c.remove();h.remove();b.unwrap();return}g(k,!1,!0)}}else{a.height="auto"==a.height?b.parent().innerHeight():a.height;k=f("").addClass(a.wrapperClass).css({position:"relative",overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var h=f("").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&
a.railVisible?"block":"none","border-radius":a.size,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=f("").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?"block":"none","border-radius":a.size,BorderRadius:a.size,MozBorderRadius:a.size,WebkitBorderRadius:a.size,zIndex:99}),z="right"==a.position?{right:a.distance}:{left:a.distance};h.css(z);c.css(z);b.wrap(k);b.parent().append(c);b.parent().append(h);
a.railDraggable&&c.draggable({axis:"y",containment:"parent",start:function(){v=!0},stop:function(){v=!1;m()},drag:function(){g(0,f(this).position().top,!1)}});h.hover(function(){s()},function(){m()});c.hover(function(){u=!0},function(){u=!1});b.hover(function(){n=!0;s();m()},function(){n=!1;m()});b.bind("touchstart",function(a){a.originalEvent.touches.length&&(y=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){b.originalEvent.preventDefault();b.originalEvent.touches.length&&g((y-
b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0)});"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),g(0,!0)):"top"!==a.start&&(g(f(a.start).position().top,null,!0),a.alwaysVisible||c.hide());A();t()}});return this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})})(jQuery);
a";
// Finish early in limited (non-browser) environments
all = div.getElementsByTagName("*") || [];
a = div.getElementsByTagName("a")[ 0 ];
if ( !a || !a.style || !all.length ) {
return support;
}
// First batch of tests
select = document.createElement("select");
opt = select.appendChild( document.createElement("option") );
input = div.getElementsByTagName("input")[ 0 ];
a.style.cssText = "top:1px;float:left;opacity:.5";
// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
support.getSetAttribute = div.className !== "t";
// IE strips leading whitespace when .innerHTML is used
support.leadingWhitespace = div.firstChild.nodeType === 3;
// Make sure that tbody elements aren't automatically inserted
// IE will insert them into empty tables
support.tbody = !div.getElementsByTagName("tbody").length;
// Make sure that link elements get serialized correctly by innerHTML
// This requires a wrapper element in IE
support.htmlSerialize = !!div.getElementsByTagName("link").length;
// Get the style information from getAttribute
// (IE uses .cssText instead)
support.style = /top/.test( a.getAttribute("style") );
// Make sure that URLs aren't manipulated
// (IE normalizes it by default)
support.hrefNormalized = a.getAttribute("href") === "/a";
// Make sure that element opacity exists
// (IE uses filter instead)
// Use a regex to work around a WebKit issue. See #5145
support.opacity = /^0.5/.test( a.style.opacity );
// Verify style float existence
// (IE uses styleFloat instead of cssFloat)
support.cssFloat = !!a.style.cssFloat;
// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
support.checkOn = !!input.value;
// Make sure that a selected-by-default option has a working selected property.
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
support.optSelected = opt.selected;
// Tests for enctype support on a form (#6743)
support.enctype = !!document.createElement("form").enctype;
// Makes sure cloning an html5 element does not cause problems
// Where outerHTML is undefined, this still works
support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>